package public

import (
	"enjoy-shop/api/base"
	"gitee.com/xuxinzhi2206/corehub/upload"
	"github.com/gin-gonic/gin"
)

func AddFile(c *gin.Context) {
	err := c.Request.ParseMultipartForm(80)
	if err != nil {
		base.RespData(c, "", err)
		return
	}

	form := c.Request.MultipartForm
	files := form.File["files"]

	urls, err := upload.UpFile(files, 10, 5, 0)

	base.RespData(c, urls, err)
}
